package cn.dnui_wwt524.dnuifood_16110100524.model;
import retrofit2.Call;

import cn.dnui_wwt524.dnuifood_16110100524.iface.SearchIface;
import cn.dnui_wwt524.dnuifood_16110100524.listener.OnRetrofitListener;
import cn.dnui_wwt524.dnuifood_16110100524.service.SearchService;

public class SearchModel extends BaseModel implements SearchIface {
    private SearchService searchService;
    public SearchModel(){
        super();
        searchService = retrofit.create(SearchService.class);
    }
    @Override
    public void getSearchByFood(String search, OnRetrofitListener listener) {
        Call call = searchService.getFoodBySearch(search);
        bindCallBack(call,listener,1);
    }
}
